﻿<%@ Page Title="ScrumPeak.com" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
  AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<StoryPreviewModel>" %>
<%@ Import Namespace="Peak.ApplicationServices"%>

<%@ Import Namespace="Peak.Web.Controllers" %>
<%@ Import Namespace="Peak.Core" %>
<%@ Import Namespace="Peak.Web.Controllers.Models" %>
<%@ Import Namespace="Peak.Resources" %>
<%@ Import Namespace="Peak.Web.Controllers.HtmlExtentions" %>
<asp:Content ContentPlaceHolderID="center" runat="server">
  <script type="text/javascript">
    $(function() {  setTableMultiSelect(); });    
  </script> 
  
  <div class="page-content">
    <div class="page-title">
      <%= PageTitles.StoryDetails %>
    </div>
    <table class="form">
      <tbody>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Name %>
          </td>
          <td class="formData">
            <%= Model.Name %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Category %>
          </td>
          <td class="formData">
            <%= Model.Category %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Priority %>
          </td>
          <td class="formData">
            <%= Model.Priority %>
          </td>
        </tr>
        
        
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.StoryPoints %>
          </td>
          <td class="formData">
            <%= Model.StoryPoints %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.RemainingEffort %>
          </td>
          <td class="formData">
            <%= DurationParser.ToString(Model.RemainingEffort)%>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Created %>
          </td>
          <td class="formData">
            <%= Model.Created %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Description %>
          </td>
          <td class="formData">
            <%= Model.Description %>
          </td>
        </tr>        
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.HowToDemo %>
          </td>
          <td class="formData">
            <%= Model.HowToDemo %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Requester %>
          </td>
          <td class="formData">
            <%= Model.Requester %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Status %>
          </td>
          <td class="formData">
            <%= Statuses.ResourceManager.GetString(Model.Status.ToString()) %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.Start %>
          </td>
          <td class="formData">
            <%= Model.StartDate %>
          </td>
        </tr>
        <tr>
          <td class="formLabel" align="right">
            <%= Labels.End %>
          </td>
          <td class="formData">
            <%= Model.EndDate %>
          </td>
        </tr>
        <tr>
          <td></td>
          <td>
            <%= Html.PeakButton<StoryController>(f => f.Edit(Model.Id), Buttons.Edit)%>  
            <%= Html.PeakButton<StoryController>(f => f.Back(), Buttons.Back)%>          
            <%= Html.PeakButton<PrintController>(f => f.Story(Model.Id), Buttons.Print)%>          
          </td>
        </tr>        
      </tbody>
    </table>
    <br />
    <h3><%= Labels.Tasks %></h3>
    <div class="separator"></div>
    <% Html.RenderPartial("Tasks",Model); %>
    
    <%--<br />
    <h3><%= Labels.Bugs %></h3>
    <div class="separator"></div>
    <% Html.RenderPartial("Bugs",Model); %>--%>
  </div>
</asp:Content>
